<template>
  <view class="tool-wrap">
    <textarea class="area" v-model="text" placeholder="快速记录想法..." placeholder-class="ph" />
    <button class="btn" @tap="save">保存到本地</button>
    <text class="hint">已保存 {{ savedCount }} 次</text>
  </view>
</template>

<script>
export default {
  name: 'NotesQuick',
  data() { return { text: '', savedCount: 0 } },
  created() {
    const v = uni.getStorageSync('quick-notes')
    if (v) this.text = v
  },
  methods: {
    save() {
      uni.setStorageSync('quick-notes', this.text)
      this.savedCount++
      uni.showToast({ title: '已保存', icon: 'none' })
    }
  }
}
</script>

<style>
.tool-wrap { display: grid; gap: 12rpx; }
.area { min-height: 180rpx; border-radius: 20rpx; padding: 16rpx; color: #e9ecff; background: rgba(255,255,255,.06); border: 2rpx solid rgba(255,255,255,.12); }
.btn { height: 60rpx; border-radius: 20rpx; border: 2rpx solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #e9ecff; font-size: 24rpx; }
.ph { color: #a7b0d9; }
.hint { color: #a7b0d9; }
</style>


